#!/usr/bin/env node

const log = console.log;

// 输出当前文件的完整路径  
log('file name:',__filename);

// 输出当前文件所在的目录
log('dir name:',__dirname);

// 拼接views子目录中view.html的路径
var fileName = __dirname + '/views/view.html';  
 
switch(Process.platform) {
    case 'linux':
        fileName = __dirname+'/views/view.html';
        break;
    case 'win32':
        // '\'转义字符
        fileName = __dirname+'\\views\\view.html';
        break;
    default:
        fileName = 'something wrong';

}

log('fileName:',fileName);




